#include <REGX52.H>

void Delay(unsigned int xms)		//@12.000MHz
{
	unsigned char i, j;

	while(xms)
	{
			i = 2;
			j = 239;
			do
			{
				while (--j);
			} while (--i);
			xms--;
	}
}



void main()
{
		
	while(1)
	{
		P2=0XFE; //11111110
		Delay(500);
		P2=0XFD; //11111101
		Delay(500);
		P2=0XFB; //11111011
		Delay(500);
		P2=0XF7; //11110111
		Delay(500);
		P2=0XEF; //11101111
		Delay(500);
		P2=0XDF; //11011111
		Delay(500);
		P2=0XBF; //10111111
		Delay(500);
		P2=0X7F; //01111111
		Delay(500);
	}
}